<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href='<c:url value="/insdep/easyui_full.css"/>' rel="stylesheet"
	type="text/css">

<script type="text/javascript"
	src='<c:url value="/insdep/jquery-1.11.3.min.js"/>'></script>
<script type="text/javascript"
	src='<c:url value="/insdep/jquery.easyui-1.5.2.min.js"/>'></script>
<script type="text/javascript"
	src='<c:url value="/insdep/insdep-extend.min.js"/>'></script>
</head>
<body>
	<script type="text/javascript">
		$(function(){
			/**
			 *关闭编辑窗口
			 */
			$("#emp_no_infomation").linkbutton({
				onClick:function(){
					$("#win_infomation").window('close');
				}
			});
		})
		
		 //这里用于重写验证 
            $.extend($.fn.validatebox.defaults.rules, { 
            	mobile: {// 验证手机号码 
                    validator: function (value) { 
                      return /^(1)\d{10}$/i.test(value); 
                    }, 
                    message: '手机号码格式不正确' 
                 } 
            });
		
		
		//修改个人的信息
		$("#getEmpEitdInformation").linkbutton({
			 onClick:function(){
				 $('#update_one_emp_infomation').form({  
					 	url:'getEmpEitdInformation',
					    onSubmit: function(param){    
					    	return $(this).form('enableValidation').form('validate');//验证
					    },    
					    success:function(data){ 
					    	/**
					    	 *操作结果
					    	 */
					        if(data) {
								$("#win_infomation").window('close');
								//提示信息
								$.messager.show({
									title:'提示',
									msg:'修改信息成功！', 
								    timeout:1000,  
									showType:'show',
									style:{
							            right:'',  
							            bottom:'' 
									}
								});
					        } else{
					        	//提示信息
					        	$("#win_infomation").window('close');
					        	$.messager.show({
									title:'提示',
									msg:'修改信息失败', 
								    timeout:1000,  
									showType:'show',
									style:{
							            right:'',  
							            bottom:'' 
									}
								});
					        }   
					    }    
					});    
					$('#update_one_emp_infomation').submit();  
			 }
		 });
		

	</script>
	<div class="easyui-layout" fit="true">
		<div data-options="region:'center'" align="center">
			<form id="update_one_emp_infomation" method="post">
				<table class="table" style="width: 498px;" border="0"
					cellpadding="0" cellspacing="0" >
					<tbody>
						<tr align="center">
							<td colspan="5" style="font-size: 15px">个人信息</td>
						</tr>
						<tr>
							<td>
								<input name="empName"  class="easyui-textbox" labelAlign='right'style="width: 49%;" label="姓名：" data-options="required:true,missingMessage:'请输入你的姓名！'">
								<select labelAlign='right' name="empSex"
									class="easyui-combobox" style="width: 49%;" label="性别："
									editable="false">
									<option value="1">男</option>
									<option value="0">女</option>
								</select>
						</tr>
						<tr>
							<td>
								<input name="empId" readonly="value" class="easyui-textbox" labelAlign='right' style="width: 49%;" label="工号：">
								<input labelAlign='right' readonly="value" name="empLoginname" class="easyui-textbox"  style="width: 49%;" label="账号：">
							</td>
						</tr>
						<tr>
							<td>
								<input name="empPhone" type="text" class="easyui-textbox" labelAlign='right' style="width: 49%;" data-options="required:true,validType:'mobile',missingMessage:'手机号码不能为空哦！'" label="手机：">
								<input name="empCornet" readonly="value" labelAlign='right' class="easyui-textbox" style="width: 49%;" label="短号：">
							</td>
						</tr>
						
						<tr>
							<td>
									<input name="empBirthday" class="easyui-datebox" labelAlign='right' style="width: 49%;" label="出生年月：" editable="false"></input>
									<input labelAlign='right' name="emp_QQ" class="easyui-textbox" style="width: 49%;"  label="QQ：">
							</td>
						</tr>
						
						<tr>
							<td>
								<input name="empEmail" class="easyui-textbox" labelAlign='right'  style="width: 49%;" label="邮箱：" data-options="
									validType:['email'],missingMessage:'请输入你的邮箱！'">
								<input name="positionName" readonly="value" class="easyui-textbox" label="职位：" style="width: 49%;" labelAlign='right'>
							</td>
						</tr>
						<tr>
							<td>
								<input name="roleName" readonly="value" class="easyui-textbox" style="width: 49%;" label="角色：" labelAlign='right' >
								<input name="deptName" readonly="value" class="easyui-textbox" style="width: 49%;" label="所在部门："  labelAlign='right' data-options="field:'deptname'">
									
								
							</td>
						</tr>
						<tr>
							<td>
								<input name="empAddress" class="easyui-textbox" labelAlign='right' style="width: 98%;" label="地址：" >
							</td>
						</tr>
						<tr>
							<td style="text-align: center;">
								<a id="getEmpEitdInformation" class="easyui-linkbutton" 
									data-options="iconCls:'icon-submit',text:'修改'"></a>
								<a id="emp_no_infomation" class="easyui-linkbutton"
									data-options="iconCls:'icon-guanbi',text:'取消'"></a>
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>